package com.ytf.test.sixth;

/**
 * @author: YTF
 * @date: 2024/9/23 12:27
 * @version: 1.0
 * @description:
 */
public class IceCream {
    public static void main(String[] args) {
        //! Sundae sundae = new Sundae(); //private 无法直接new创建
        Sundae sundae = Sundae.makeASundae();
        /**
         * Output:
         *  Sundae Constructor
         */
    }
}
class Sundae{
    private Sundae() {
        System.out.println("Sundae Constructor");
    }
    public static Sundae makeASundae(){
        return new Sundae();
    }
}
